Functions in object-oriented programs, such as C/C++ programs, may define automatic variables that are visible only within the body of the defining function. Each invocation (call) of a function at runtime may create an instance of automatic variables defined in the function. The lifetime of automatic variables in a function may be the same as the duration of a call that instantiated the automatic variables, for example. Automatic variables may be implemented by allocating them on a stack. Modern computer architectures, such as embedded processors, may organize memory in multiple banks with the intention of enabling multiple accesses to memory in a single instruction and completing them in a single cycle. This memory banking may apply well to global variables because the programmer has flexibility to locate them anywhere in address space. However, the stack based implementation of automatic variables is not suitable for allocating automatic variables to multiple memory banks. For example, some instructions may take a stall cycle because the instruction may make two memory accesses to the same bank.